# -*- mode: makefile-gmake -*-
#
#  Copyright (c) 2007-09-10 by Duzy Zhan <duzy@duzy.ws>
#

include $(YISC_DIR)/global.mak

LDFLAGS	+= -L$(YISC_DIR)/lib
LIBS	+= -lyisc-http-server

ifeq ($(PLATFORM),linux)
  TARGET = http
  LIBS += -lboost_thread-gcc41-mt
  CXXFLAGS += -W -Wall -g -DHTTP_SERVER_LOGGING=true
else
  TARGET = http.exe
  LIBS += -lws2_32 -lmswsock -lboost_thread-mgw34-mt-1_34
  CXXFLAGS += -W -Wall -g -D_WIN32_WINNT=0x0500 -DHTTP_SERVER_LOGGING=true
endif

PHONY = all
all: $(TARGET)

$(TARGET): $(OBJECTS)
	$(LINK) -o $@ $^ $(LIBS)

.PHONY: $(PHONY)